package com.nzy.number;

import cn.hutool.core.util.NumberUtil;

import java.math.BigDecimal;

/**
 * @author jukg
 * @date 2023/07/19 17:35
 * @description
 */
public class DoubleCompare {

    public static void main(String[] args) {
        double d1 = 0.7;
        double d2 = 0.007;
        BigDecimal b3 = new BigDecimal(String.valueOf(d2)).multiply(new BigDecimal(100));
        System.out.println(b3);
        System.out.println(d1-b3.doubleValue() == 0);
        System.out.println(d1-b3.doubleValue() > 0);
        System.out.println(d1-b3.doubleValue() < 0);

    }
}
